// MainFrm.h : interface of the CMainFrame class
//
#pragma once

#include "DlgBarQuickConn.h"

class CFtpConnection;
class CSocketConnection;

class CMainFrame : public CFrameWnd
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

// Attributes
protected:
	CSplitterWnd m_wndSplitter;
public:
	CImageList m_imageSmall;
// Operations
public:

// Overrides
public:
	virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CToolBar    m_wndToolBar;
	CDlgBarQuickConn m_wndQuickConnect;

// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()
public:
	void OnConnect(CString szHost, UINT nPort, CString szUser, CString szPass);
	void OnChangeDir(CString dir);
	void EnterDir(CString dir);
	void UpDir();
	void AddDownFtpFile(CString file);

private:
	CFtpConnection* m_pFtp;
	CSocketConnection* m_pSocket;

	void UpdateRemoteList(CString cs);
	CString GetCurLocalDir();
};


